package portlet.common.search;

import java.util.ArrayList;
import java.util.List;

import oracle.jbo.ViewCriteria;
import oracle.jbo.ViewCriteriaItem;
import oracle.jbo.ViewCriteriaRow;
import oracle.jbo.ViewObject;

public class AdvancedSearchItem extends AdvancedSearch implements AdvancedSearchConst {
    ViewCriteriaRow vcr;
    private String itemName;
    private int conjunction;
    private String operator;
    private boolean upperColumns;
    private boolean required;
    private List<Object> listValue;
    private List<AdvancedSearchGroup> listChildren;

    public AdvancedSearchItem() {
        super();
        conjunction = VC_CONJ_AND;
        operator = OPER_EQ;
        upperColumns = false;
        required = false;
        listValue = new ArrayList();
        listChildren = new ArrayList();
    }

    public int getUpperColumns() {
        return upperColumns ? VC_UPPER_COL_TRUE : VC_UPPER_COL_FALSE;
    }

    public int getRequired() {
        return required ? VCITEM_REQUIRED : VCITEM_OPTIONAL;
    }

    public void setUpperColumns(boolean upperColumns) {
        this.upperColumns = upperColumns;
    }

    public boolean isUpperColumns() {
        return upperColumns;
    }

    public void setConjunction(int conjunction) {
        this.conjunction = conjunction;
    }

    public int getConjunction() {
        return conjunction;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    public String getOperator() {
        return operator;
    }

    public List<Object> getListValue() {
        return listValue;
    }

    public void setItemName(String itemName) {
        this.itemName = itemName;
    }

    public String getItemName() {
        return itemName;
    }

    public void setRequired(boolean required) {
        this.required = required;
    }

    public boolean isRequired() {
        return required;
    }

    public List<AdvancedSearchGroup> getListChildren() {
        return listChildren;
    }
}
